package com.gxar.uaa.server.db.model;

import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 角色用户实体
 *
 * @author linsy
 * @version 1.0
 * @created 2024/1/4 14:38
 */
@Entity
@Getter
@Setter
@NoArgsConstructor
@Table(name = "sys_role_user")
@IdClass(UserRolePK.class)
public class SysRoleUserEntity implements Serializable {

    /**
     * 用户id
     */
    @Id
    private Long userId;

    /**
     * 角色id
     */
    @Id
    private Long roleId;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建时间
     */
    private Date createdAt;

}
